How to Import Mixed Format Columns from Excel

Description

When you use AlphaDAO to import Excel spreadsheets, you are using the Microsoft (MDAC) ODBC driver. If you mix numbers and text in a column, the results may not be what you expect.

Excel requires a data value that contains a number to be preceded with a single quote ' for it to be stored as text. Ideally, you should do this for every row of the column if you are mixing numbers with text. If you don't do that, you can have the following scenario:

  • The Excel MDAC/ODBC driver looks at the column (or 8 rows of the column) and concludes that the column is a text column.

  • When the driver returns rows that contain data stored as numbers, it returns NULL for the value of the row. It would be nice if it would automatically convert as SQL Server does, but it does not. It returns NULL.